package cn.chiship.framework.upms.biz.system.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @author lijian
 */
@ApiModel(value = "三方数据库连接表单")
public class DatabaseConnectDto {
    @ApiModelProperty(value = "数据库类型")
    @NotNull
    @Length(min = 1, max = 50)
    private String dbType;

    @ApiModelProperty(value = "驱动类")
    @NotNull
    @Length(min = 2, max = 200)
    private String dbDriver;

    @ApiModelProperty(value = "数据源地址")
    @NotNull
    @Length(min = 2, max = 300)
    private String dbUrl;

    @ApiModelProperty(value = "数据库名称")
    @NotNull
    @Length(min = 2, max = 50)
    private String dbName;

    @ApiModelProperty(value = "用户名")
    @NotNull
    @Length(min = 2, max = 50)
    private String dbUsername;

    @ApiModelProperty(value = "密码")
    @NotNull
    @Length(min = 2, max = 100)
    private String dbPassword;


    public String getDbType() {
        return dbType;
    }

    public void setDbType(String dbType) {
        this.dbType = dbType;
    }

    public String getDbDriver() {
        return dbDriver;
    }

    public void setDbDriver(String dbDriver) {
        this.dbDriver = dbDriver;
    }

    public String getDbUrl() {
        return dbUrl;
    }

    public void setDbUrl(String dbUrl) {
        this.dbUrl = dbUrl;
    }

    public String getDbName() {
        return dbName;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getDbUsername() {
        return dbUsername;
    }

    public void setDbUsername(String dbUsername) {
        this.dbUsername = dbUsername;
    }

    public String getDbPassword() {
        return dbPassword;
    }

    public void setDbPassword(String dbPassword) {
        this.dbPassword = dbPassword;
    }
}
